domain builder: Zero start_info struct.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 3 Aug 2007 11:23:03 +0000 (12:23 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 3 Aug 2007 11:23:03 +0000 (12:23 +0100)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/libxc/xc_dom_x86.c

index bbb4e1c9bc203983f2278c07389e7d0845c69188..1a6aeb19726deae7dba1405805a286cbb8a0b740 100644 (file)
@@ -417,6 +417,7 @@ static int start_info_x86_32(struct xc_dom_image *dom)
 
     xc_dom_printf("%s: called\n", __FUNCTION__);
 
+    memset(start_info, 0, sizeof(*start_info));
     sprintf(start_info->magic, dom->guest_type);
     start_info->nr_pages = dom->total_pages;
     start_info->shared_info = shinfo << PAGE_SHIFT_X86;
@@ -455,6 +456,7 @@ static int start_info_x86_64(struct xc_dom_image *dom)
 
     xc_dom_printf("%s: called\n", __FUNCTION__);
 
+    memset(start_info, 0, sizeof(*start_info));
     sprintf(start_info->magic, dom->guest_type);
     start_info->nr_pages = dom->total_pages;
     start_info->shared_info = shinfo << PAGE_SHIFT_X86;